package IMIC.NGUYENCONGHUY.BAITAP2.MVC;


public class Model {
	public double TT(Entity Sott){
		
		double resutl = 0;
		switch (Sott.getResutl()) {
		case 0:
			resutl = (Sott.getSoA()+Sott.getSoB());
			break;
		case 1:
			resutl = (Sott.getSoA()-Sott.getSoB());
			break;
		case 2: resutl = (Sott.getSoA()*Sott.getSoB());
			break;
		case 3: resutl = (Sott.getSoA()/Sott.getSoB());
			break;
		}
		return resutl;
	}
}
